package utility;

import java.io.Serializable;
import java.util.ArrayList;

@SuppressWarnings("serial")
public class ResultMessage implements Serializable{
	public static final ResultMessage EXIST = new ResultMessage("exist");
	public static final ResultMessage NOT_EXIST = new ResultMessage("inexist");
	public static final ResultMessage MODIFY_SUCCESS = new ResultMessage("modifysuccess");
	public static final ResultMessage MODIFY_FAIL = new ResultMessage("modifyfail");
	public static final ResultMessage PUBLISH_SUCCESS = new ResultMessage("publishsuccess");
	public static final ResultMessage PUBLISH_FAIL = new ResultMessage("publishfail");
	public static final ResultMessage SUBMIT_SUCCESS = new ResultMessage("submitsuccess");
	public static final ResultMessage SUBMIT_FAIL = new ResultMessage("submitfail");
	public static final ResultMessage REGISTER_SUCCESS = new ResultMessage("registersuccess");
	public static final ResultMessage REGISTER_FAIL = new ResultMessage("registerfail");
	public static final ResultMessage SELECT_SUCCESS = new ResultMessage("selectsuccess");
	public static final ResultMessage SELECT_FAIL = new ResultMessage("selectfail");
	public static final ResultMessage QUIT_SUCCESS = new ResultMessage("quitsuccess");
	public static final ResultMessage QUIT_FAIL = new ResultMessage("quitfail");
	public static final ResultMessage SHORT_LENGTH = new ResultMessage("shortlength");
	private String result;
	private ArrayList<String> list;
	
	public boolean equals(ResultMessage rm){
		if(this.getResult().equals(rm.getResult()))
			return true;
		else
			return false;
	}
	
	public ResultMessage(String result){
		this.result = result;
	}
	
	public ResultMessage(ArrayList<String> list){
		this.list = list;
	}
	
	public ResultMessage(){
		
	}
	
	public String getResult(){
		return result;
	}
	
	public ArrayList<String> getList(){
		return list;
	}
}

